package com.ht.medicaltreatment.activity

import android.view.View
import com.gym.baselib.base.BaseActivity
import com.ht.medicaltreatment.R
import com.xgst.lib.utils.showToast
import kotlinx.android.synthetic.main.activity_lin_chuang_layout.imgBX
import kotlinx.android.synthetic.main.activity_lin_chuang_layout.imgFZHY
import kotlinx.android.synthetic.main.activity_lin_chuang_layout.imgHC
import kotlinx.android.synthetic.main.activity_lin_chuang_layout.imgJS
import kotlinx.android.synthetic.main.activity_lin_chuang_layout.imgLX
import kotlinx.android.synthetic.main.activity_lin_chuang_layout.imgYB
import kotlinx.android.synthetic.main.activity_lin_chuang_layout.tvBloodSpecimenCollection

class LinChuangActivity:BaseActivity(), View.OnClickListener {

    override fun getLayoutId() = R.layout.activity_lin_chuang_layout

    override fun init() {
        setTitle("临床流程")
        imgFZHY.setOnClickListener(this)
        imgYB.setOnClickListener(this)
        imgJS.setOnClickListener(this)
        imgLX.setOnClickListener(this)
        imgBX.setOnClickListener(this)
        imgHC.setOnClickListener(this)
        tvBloodSpecimenCollection.setOnClickListener(this)

    }

    override fun onClick(v: View?) {
        when(v){
            //分组核验  - 核验分装
            imgFZHY -> startActivity(GroupCheckActivity::class.java)
            //样本采集(患者采血)
            imgYB -> startActivity(CollectionBloodMainActivity::class.java)
            //样本接收
            imgJS -> startActivity(SampleReceiveActivity::class.java)
            //离心
            imgLX -> startActivity(CentrifugeActivity::class.java)
            //存入冰箱 - 归还
            imgBX -> startActivity(ReturnSampleActivity::class.java)
            //耗材接收
            imgHC -> showToast("请通过首页的【转入】功能进行操作")
            //血样采集
            tvBloodSpecimenCollection -> startActivity(BloodSpecimenCollectionMainActivity::class.java)
        }
    }
}
